﻿using System.Data.Entity;

namespace LB.Server.DAL.EntityFramework
{
    public static class DbFiller
    {
        public static void FillDatabaseIfNotExist()
        {
            Database.SetInitializer<RepositoryDataContext>(new RepositoryInitializerCreateDatabaseIfNotExists());
        }

        public static void FillDatabaseDropCreateAlvays()
        {
            Database.SetInitializer<RepositoryDataContext>(new RepositoryInitializerDropCreateDatabaseAlways());
        }

        public static void FillDatabaseDropCreateIfModelChanged()
        {
            Database.SetInitializer<RepositoryDataContext>(new RepositoryInitializerDropCreateDatabaseIfModelChanges());
        }
    }
}